package com.edu.service.impl;

import com.edu.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserService {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("Spring-ioc.xml");
        UserDao userDao = (UserDao) context.getBean("userDao");
        userDao.insertUser();
        userDao.selectUser();
    }
}
